<!DOCTYPE html> 
<html> 
<head> 
	<title>		
	<?php
            echo $titulo = ( isset($titulo) )? $titulo: '';
	?>
	</title>
<!--        <link rel="shortcut icon" href="../../img/favicon.ico" type="image/x-icon" />-->
	
        <meta name="viewport" content="width=device-width, initial-scale=1">
	<?php
            echo html_Core::stylesheet('css/themes/biblioteca');
            echo html_Core::stylesheet('http://code.jquery.com/mobile/1.1.0/jquery.mobile.structure-1.1.0.min.css');
            echo html_Core::stylesheet('css/style');
	?>
        <?php 
            echo html_Core::script('http://code.jquery.com/jquery-1.7.1.min.js');
            echo html_Core::script('js/functions.js');
            echo html_Core::script('http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.js');
            echo html_Core::script('js/jquery.maskedinput.js');
        ?>
<!--	<script type="text/javascript" src="js/functions.js"></script>-->
	<script>
            $(document).bind('mobileinit', function(){
                $.mobile.page.prototype.options.addBackBtn = true;
                $.mobile.page.prototype.options.backBtnText = "Voltar";
                $.mobile.loadingMessage = "Carregando..."; 
                $.mobile.ajaxLinksEnabled = false;
                $.mobile.ajaxFormsEnabled = false;
                $.mobile.ajaxEnabled = false;
                $.mobile.touchOverflowEnabled = true;
//              $.mobile.pageLoading(); 
//              $.mobile.showPageLoadingMsg();
//              $.mobile.hidePageLoadingMsg();
            });
            
            $('#pagina').bind('pageinit', function(){
//                renderPage();
                
            });
            
            $(document).ready(function(){
                validarDosesVacinas();
            });
 
            <?php echo isset( $myJS )? $myJS : ''; ?>
	</script>
        <?php
            echo html_Core::script('http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js');
        ?>
</head> 
<body> 

    <div id="pagina" data-role="page" <?php echo ( isset($pageAttr) )? $pageAttr : '';?> >

	<div data-role="header" data-theme="a">
		
		<?php
		if ( $backBtn === true ) {
			echo html::anchor('', 'Voltar', array('data-icon' => 'back', 'data-rel' => 'back'));
		} else {
			echo '';
		}
		?>
		
		<h1>
			<?php echo ( isset($header) )? $header : '';?>
		</h1>
		
		<?php
		if ( isset($_SESSION['sessaoUser']) ) {
			echo html::anchor('home/deslogar', 'Sair', array('data-icon' => 'delete' , 'data-theme' => 'a', 'class' => 'ui-btn-right') );
		}
		echo ( isset($menu) )? $menu : '';
		?>
	</div><!-- /header -->

	<div data-role="content">
		<?php
                    echo ( isset($body) )? $body: '';
		?>	
	</div><!-- /content -->
	
	<div data-role="footer" data-position="fixed" data-theme="a">
            <small>© 2012 Biblioteca Mobile - Desenvolvido por <strong>Fulano Tech</strong></small>
	</div>

</div><!-- /page -->
<script type="text/javascript"> <?php echo ( isset($js) )? $js : ''; ?> </script>
</body>
</html>